package com.opensicence.test.propertiesBinding;

import javafx.beans.binding.Bindings;
import javafx.beans.binding.NumberBinding;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;

public class PropertyBinding {

	public static void main(String[] args) {
		IntegerProperty a = new SimpleIntegerProperty(1);
		IntegerProperty b = new SimpleIntegerProperty(2);
		NumberBinding add2 = Bindings.add(a, b);
		System.out.println(add2.getValue());
		a.set(2);
		System.out.println("----------------------------");
//		System.out.println(add2.getValue());
		System.err.println(add2.getValue());
		
	}

}
